
#include <pic18.h>
#include "hardware.h"
#include "UART.h"
#include "App.h"

#define   SYSTIME_PERIOD 	100

extern volatile near bit TimeI_10ms;


void interrupt ISR ( void )
{
	if ( T0IF )
	{
		TMR0 = SYSTIME_PERIOD;	  /* 156 * 64uS = 9984uS if 8MHz */
		TimeI_10ms = 1;
		T0IF = 0;
	}

	if ( RCIF )
	{		
		UART_Receiver();
		
/* 		while(!TXIF)	/\* set when register is empty *\/ */
/* 			continue; */
/* 		TXREG = RCREG; */
		RCIF = 0;
	}
	
	
/* 	if ( RBIF ) */
/* 	{ */
/* 		PORTB = PORTB; */
/* 		RBIF = 0; */
/* 		RBIE = 0; */
/* 	} */
}
